package _2025_4_13;

import java.util.concurrent.locks.ReentrantLock;

public class AdvancedLockExample {
    private final static ReentrantLock locker=new ReentrantLock();

    public static void main(String[] args) {
        Thread t = new Thread (()->{

                locker.lock();//获取锁
             try{
                 System.out.println("线程t执行操作");
           }
             finally {
                 locker.unlock();//释放锁
             }
             });
    }
    // 类似地处理其他线程
}
